package com.butterfly.domain.entity;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.ManyToOne;

@Entity
public class UserRoles extends BaseEntity {
	
	private static final long serialVersionUID = -8673688513437036577L;

	@ManyToOne
	private User user;
	
	@Enumerated(EnumType.STRING)
	private Role role;

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	@Override
	public String toString() {
		return "UserRoles [user=" + user + ", role=" + role + "]";
	}
	
}
